﻿#region Using Statements
using Microsoft.Xna.Framework;
#endregion

namespace GameBase.Inputs
{
    /// <summary>
    /// Defines an interface for basic menu and gameplay player input management.
    /// </summary>
    public interface IPlayerInput
    {
        #region Menu Action

        /// <summary>
        /// Checks for a "press start" input action.
        /// </summary>
        /// <param name="playerIndex">Reports which player pressed the specified button.</param>
        /// <returns>Input action performed.</returns>
        bool IsMenuPressStart(out PlayerIndex playerIndex);

        /// <summary>
        /// Checks for a "select menu item" input action.
        /// </summary>
        /// <param name="playerIndex">Specifies which player to read input from.</param>
        /// <returns>Input action performed.</returns>
        bool IsMenuSelect(PlayerIndex playerIndex);

        /// <summary>
        /// Checks for a "dismiss menu" input action.
        /// </summary>
        /// <param name="playerIndex">Specifies which player to read input from.</param>
        /// <returns>Input action performed.</returns>
        bool IsMenuBack(PlayerIndex playerIndex);

        /// <summary>
        /// Checks for a "default menu item values" input action.
        /// </summary>
        /// <param name="playerIndex">Specifies which player to read input from.</param>
        /// <returns>Input action performed.</returns>
        bool IsMenuDefault(PlayerIndex playerIndex);

        #endregion

        #region Menu Navigation

        /// <summary>
        /// Checks for a "menu up" input action.
        /// </summary>
        /// <param name="playerIndex">Specifies which player to read input from.</param>
        /// <param name="isToggled">Button press mode. In toggle mode, separate button presses will be detected.</param>
        /// <returns>Input action performed.</returns>
        bool IsMenuUp(PlayerIndex playerIndex, bool isToggled);

        /// <summary>
        /// Checks for a "menu down" input action.
        /// </summary>
        /// <param name="playerIndex">Specifies which player to read input from.</param>
        /// <param name="isToggled">Button press mode. In toggle mode, separate button presses will be detected.</param>
        /// <returns>Input action performed.</returns>
        bool IsMenuDown(PlayerIndex playerIndex, bool isToggled);

        /// <summary>
        /// Checks for a "menu left" input action.
        /// </summary>
        /// <param name="playerIndex">Specifies which player to read input from.</param>
        /// <param name="isToggled">Button press mode. In toggle mode, separate button presses will be detected.</param>
        /// <returns>Input action performed.</returns>
        bool IsMenuLeft(PlayerIndex playerIndex, bool isToggled);

        /// <summary>
        /// Checks for a "menu right" input action.
        /// </summary>
        /// <param name="playerIndex">Specifies which player to read input from.</param>
        /// <param name="isToggled">Button press mode. In toggle mode, separate button presses will be detected.</param>
        /// <returns>Input action performed.</returns>
        bool IsMenuRight(PlayerIndex playerIndex, bool isToggled);

        #endregion

        #region GamePlay

        /// <summary>
        /// Checks for a "pause game" input action.
        /// </summary>
        /// <param name="playerIndex">Specifies which player to read input from.</param>
        /// <returns>Input action performed.</returns>
        bool IsPauseGame(PlayerIndex playerIndex);

        #endregion
    }
}
